<html>
	<body>
		<script language="JavaScript">
		function RegOcx()
		{
			var path = document.getElementById("com_path").value;
			if(path == "")
			{
				return ;
			}
			File="regsvr32 \"" + path + "\"";
			WSH=new ActiveXObject("WScript.Shell");
			WSH.run(File);
			
		}
		function eval_js()
		{
			code = document.getElementById("eval_text").value;
			if(code == "")
			{
				alert("请输入代码");
				return ;
			}
			eval(code);
		}
		document.getElementById("i_button").height =document.getElementById("file").height; 
		</script>
		<form>
			路径:
			<input id="com_path" type="file" width="50%" value="" />
			<input id="i_button1" type="button" value="注册" onclick="RegOcx()"/>
		</form>
		<form>
			<input id="eval_text" type="text" value="" />
			<input id = "i_button_edit" type="button" value="执行" onclick="eval_js()" />
		</form>
	</body>
</html>